package com.lyn.gulimall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 缓存穿透:查询一个null数据。解决:缓存空数据;ache-null-values=true
 * 缓存击穿:大量并发进来同时查询一个正好过期的数据。解决。加锁;?
 * 实存雪崩:大量的hey同时过期。解决:加随机时间。
 */
@EnableRedisHttpSession
@EnableFeignClients(basePackages = "com.lyn.gulimall.product.feign")
@EnableDiscoveryClient
@MapperScan("com.lyn.gulimall.product.dao")
@SpringBootApplication
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
